Repository navigation
support NEF/ARW/DNG raw formats and zero-padded image IDs - #130
Open
ManuelOsburg wants to merge 2 commits into
Open
ManuelOsburg wants to merge 2 commits into
ManuelOsburg wants to merge 2 commits into
Conversation
Adopted and reworked from the annatroff/LEDSAwindows fork:
- extend the raw format whitelist in image_reading by .NEF, .ARW and
.DNG (rawpy reads them already; EXIF works with the existing exiv2
binding) and raise a clear ValueError for unsupported extensions
instead of failing with UnboundLocalError
- fix a path bug in ConfigData.get_start_time where directory and file
name were concatenated without a separator inside os.path.join
- add image_handling.format_img_name and use it wherever image names
are built from the config template: plain {} placeholders now keep
zero-padded IDs such as '0001' (DSC_0001.NEF), while numeric format
specs like {:04d} still receive an integer
The int() casts previously applied before formatting broke camera
series with zero-padded file counters. Unit tests cover the extension
routing and both formatting paths.
Since 12b7e7d plain {} placeholders keep zero-padded image IDs, while numeric format specs such as {:d} or {:04d} receive an integer. Two places in ConfigData still called img_name_string.format() directly, so templates with a numeric format spec failed there with a ValueError and series with unpadded file names (img_1.jpg) could not be configured at all. Use format_img_name in get_start_time and in_time_diff_to_img_time as well. The acceptance test images are named test_img_1.jpg etc. With the zero-padded IDs the template test_img_{}.jpg pointed to test_img_0001.jpg and every suite from S3 on failed. Use test_img_{:d}.jpg in the test library, which is the template for unpadded file names. (cherry picked from commit c0bbf50)
Author
|
Hi Kristian, I pushed one more commit to this PR (
Tests: unit tests pass, and Robot suites 02–06 pass. S1 fails on Windows independently of this PR; I'll open a separate issue for it. One point to decide: existing configs that use Best, |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adopted and reworked from the annatroff/LEDSAwindows fork:
The int() casts previously applied before formatting broke camera series with zero-padded file counters. Unit tests cover the extension routing and both formatting paths.